package server.business.service.Impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import server.business.mapper.RecordMapper;
import server.business.pojo.PatientTransfusionRecord;
import server.business.service.RecordService;

import java.util.List;

@Service("RecordService")
public class RecordServicelmpl extends ServiceImpl<RecordMapper, PatientTransfusionRecord> implements RecordService {

    @Autowired
    private RecordMapper recordMapper;
    @Autowired
    private RecordService recordService;

    public IPage<PatientTransfusionRecord> selectByPage(int currentPage, int pageSize){
        Page<PatientTransfusionRecord> page = new Page<>(currentPage,pageSize);
        IPage<PatientTransfusionRecord> sampleIpage = recordMapper.selectPage(page,null);
        return sampleIpage;
    }

    public List<PatientTransfusionRecord> queryData(){
        List<PatientTransfusionRecord> list = recordService.list();
        return list;
    }
}
